package com.message.tcp.ip.socket.configure.service;

import java.sql.SQLException;
import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.message.tcp.ip.socket.configure.dao.CaseDao;
import com.message.tcp.ip.socket.configure.entity.Case;
@Service("caseService")
public class CaseServiceImp implements CaseService {
	private static final Logger logger = Logger.getLogger(CaseServiceImp.class);
	@Autowired
	private CaseDao caseDao;
	public void setCaseDao(CaseDao caseDao){
		this.caseDao = caseDao;
	}
	@Override
	public List<Case> getIssCases() {
		try {
			return caseDao.getIssCase();
		} catch (SQLException e) {
			logger.debug("Exception occured while try to get issuer cases", e);
			return null;
		}
	}

	@Override
	public List<Case> getAcqCases() {
		try {
			return caseDao.getAcqCase();
		} catch (SQLException e) {
			logger.debug("Exception occured while try to get acquirer cases", e);
			return null;
		}
	}

}
